package com.example.mapper;

import com.example.entity.Customer;
import com.example.entity.Params;
import com.example.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CustomerMapper {
    List<Customer> findBySearch(@Param("params") Params params);

    @Select("select * from user where name = #{name} Limit 1")
    Customer findByName(@Param("name") String name);


    Customer findByNameAndPassword(@Param("name") String name, @Param("password") String password);

    int deleteById(Integer id);

    int add(Customer customer);

    int update(Customer customer);


    User selectById(Integer userid);
}
